
var _util = require("util/util.js");

var psychologist = {
	//获取医生列表
	getPsychologistList : function(data,resolve,reject){
		_util.request({
            url     : _util.getServerUrl('/psychologist/list.do'),
            method  : 'post',
            data 	: data,
            success : resolve,
            error   : reject
        });
	},
    //获取点赞次数最多的三个人
    getPsychologistFirstThree : function(resolve,reject){
        _util.request({
            url     : _util.getServerUrl('/psychologist/query_psychologist_first_three.do'),
            method  : 'post',
            success : resolve,
            error   : reject
        });
    },
    //获取点赞次数最多的三个人
    like : function(data,resolve,reject){
        _util.request({
            url     : _util.getServerUrl('/psychologist/like.do'),
            method  : 'post',
            data    : data,
            success : resolve,
            error   : reject
        });
    },
    //获取点赞次数最多的三个人
    register : function(data,resolve,reject){
        _util.request({
            url     : _util.getServerUrl('/psychologist/register.do'),
            method  : 'post',
            data    : data,
            success : resolve,
            error   : reject
        });
    },
    //根据真实姓名和简介搜索咨询师列表
    searchPsychologistList : function(data,resolve,reject){
        _util.request({
            url     : _util.getServerUrl('/psychologist/search_list.do'),
            method  : 'post',
            data    : data,
            success : resolve,
            error   : reject
        });
    },
    //校验身份证
    checkIdentity : function(data,resolve,reject){
        _util.request({
            url     : _util.getServerUrl('/psychologist/check_identity.do'),
            method  : 'post',
            data    : data,
            success : resolve,
            error   : reject
        });
    },
    //点击咨询聊天，获取该医生的信息聊天
    query_chat_user : function(data,resolve,reject){
        _util.request({
            url     : _util.getServerUrl('/psychologist/query_chat_user.do'),
            method  : 'post',
            data    : data,
            success : resolve,
            error   : reject
        });
    },
    //获取医生的详情
    getPsychologistDetail : function(data,resolve,reject){
        _util.request({
            url     : _util.getServerUrl('/psychologist/detail.do'),
            method  : 'post',
            data    : data,
            success : resolve,
            error   : reject
        });
    },
    //认证失败时重新上传资料
    updateInfo : function(data,resolve,reject){
        _util.request({
            url     : _util.getServerUrl('/psychologist/update_info.do'),
            method  : 'post',
            data    : data,
            success : resolve,
            error   : reject
        });
    }
}

module.exports = psychologist;